package proxy.staticproxy;

import proxy.target.Star;

/**
 * 静态代理
 * @author wangxun
 * @version 1.0
 * @description: TODO
 * @date 2020/11/13 9:32 上午
 */
public class StarStaticProxy implements Star {
    private Star star;

    public StarStaticProxy(Star star) {
        this.star = star;
    }

    /**
     * 唱歌
     */
    @Override
    public void sing() {
        star.sing();
    }

    @Override
    public void sign() {
        System.out.println("接待");
        System.out.println("谈合同");
        star.sign();
        System.out.println("跟踪");
    }

    @Override
    public void collect() {
        System.out.println("催促");
        star.collect();
        System.out.println("告知对方");
    }
}
